
<?php

class ExperienceForm extends sfForm
{
  protected static $subjects = array('Excellent', 'Good', 'Average','Weak','Not suitable ');
  protected static $side = array('Boys', 'Girls');
 
  public function configure()
  {
    $subjects=array('informaion system','database','parallel computing');  

     for ($i=0 ;$i<3 ; $i++)
    $this->setWidget($subjects[$i] , new sfWidgetFormSelect(array('choices' => self::$subjects)));

    $this->setWidget('Preferable teaching side' , new sfWidgetFormSelect(array('choices' => self::$side)));



    $this->widgetSchema->setNameFormat('contact[%s]');

    for ($i=0 ;$i<3 ; $i++)
    $this->setValidator($subjects[$i] , new sfValidatorChoice(array('choices' => array_keys(self::$subjects))));
    
$this->setValidator('Preferable teaching side' , new sfValidatorChoice(array('choices' => array_keys(self::$side))));


  }
}

